export function handleCategory(data) {
    const category = data.categories;
    const categoryData = Object.entries(category).map(([k, v]) => {
        return {
            name: v,
            subs: []
        };
    });
    for (let v of data.sub) {
        categoryData[v.category].subs.push(v);
    }

    return categoryData;
}
export function singerAlpFn() {
    const alp = [{
        alpha: "-1",
        title: "热门"
    }];
    const start = "A".charCodeAt(0);
    const last = "Z".charCodeAt(0);

    for (let i = start; i < last; i++) {
        alp.push({
            alpha: String.fromCharCode(i),
            title: String.fromCharCode(i)
        });
    }
    alp.push({
        alpha: "0",
        title: "其他"
    });
    return alp;
}
export const singerAlp = singerAlpFn();